<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>swiper</title>
    <!-- 1.引入插件 -->
    <link rel="stylesheet" href="./css/swiper-bundle.min.css">
    <!-- 3.复制粘贴  css -->
    <style>
        * {
            padding: 0;
            margin: 0;
        }
        
        .swiper-container {
            width: 100%;
            height: 177.5px;
            overflow: hidden;
        }
        
        .swiper-slide img {
            width: 100%;
        }
        
        .swiper-pagination-bullet {
            width: 8px;
            height: 8px;
            display: inline-block;
            border-radius: 50%;
            background: #000;
            opacity: .2;
        }
        
        .swiper-pagination-bullet-active {
            width: 16px;
            height: 8px;
            display: inline-block;
            border-radius: 8px;
            background: #4eddf9;
            opacity: 1;
        }
    </style>
</head>

<body>
    <!--2.复制粘贴-->
    <div class="swiper-container">
        <div class="swiper-wrapper">
            <div class="swiper-slide"><img src="https://pic.51houniao.com/dd30c72746124fa3a6cc264a37efd1ba.jpg" alt="图片1" /></div>
            <div class="swiper-slide"><img src="https://pic.51houniao.com/5ab2f27f14684116886b2e6e5ece6ea5.jpg" alt="图片1" /></div>
            <div class="swiper-slide"><img src="https://pic.51houniao.com/dc9457f3a6304894a3ee518c4b419c45.jpg" alt="图片1" /></div>
        </div>
        <!-- 如果需要分页器 -->
        <div class="swiper-pagination"></div>

        <!-- 如果需要导航按钮 -->


        <!-- 如果需要滚动条 -->
        <!-- <div class="swiper-scrollbar"></div> -->
    </div>
    <script src="js/flexible.js"></script>
    <script src="js/swiper-bundle.min.js"></script>
    <!-- 4.复制粘贴js  初始化轮播图 -->
    <script type="text/javascript">
        var mySwiper = new Swiper('.swiper-container', {
            direction: 'horizontal', // 水平切换选项
            loop: true, // 循环模式选项
            // autoplay: true, //自动轮播
            autoplay: {
                delay: 1000,
                stopOnLastSlide: true,
                disableOnInteraction: false,
                reverseDirection: false,
                pauseOnMouseEnter: true,

            },
            // 如果需要分页器
            pagination: {
                el: '.swiper-pagination',
                clickable: true,
            },

            // 如果需要前进后退按钮
            // navigation: {
            //     nextEl: '.swiper-button-next',
            //     prevEl: '.swiper-button-prev',
            // },

            // 如果需要滚动条
            // scrollbar: {
            //     el: '.swiper-scrollbar',
            // },
        })
    </script>
    <!-- 5.搜索查看一下设置参数的文档 -->
</body>

</html>